{template "header.html"}
{template "index-fanhui.html"}
<script>
function dr_edit_son_type(tid) {
    dr_iframe("{dr_lang('修改分类')}", "{dr_member_url($uriprefix.'/son_edit', ['cid'=>$index.id])}&tid="+tid, '50%', '100');
}
function dr_add_son_type() {
    dr_iframe("{dr_lang('添加分类')}", "{dr_member_url($uriprefix.'/son_add', ['cid'=>$index.id])}", '50%', '100');
}
function dr_del_son_type(tid) {
    dr_ajax_option('{dr_member_url($uriprefix.'/son_del', ['cid'=>$index.id])}&tid='+tid, '{dr_lang('此操作将联动删除本类下的全部章节，你确定要删除吗？')}', 1)
}
</script>
<script src="{THEME_PATH}assets/js/admin.js" type="text/javascript"></script>

<div class="d-clear"></div>
<form class="" role="form" id="myform">
<div class="d-container ">
	<div class="d-row">
		<div class="d-col-md-8-juzhong">
			<div class="d-kuan d-beijing-baise d-yuanjiao-10" >
				<div class="d-neikuang-20 ">
					{loop $stype $i $t}
					   {if $t['moren'] ==1}
						<div class="d-kuan d-buhuanhang">
							<div class="d-hanggao-30 d-kuan d-beijing-hei-d9 d-xia-10 d-yuanjiao-10 pull-left">
								<span class="d-zuo-10">{$i} - {$t['name']} - （默认）</span>
							</div>
							
							<a class="d-zuo-10 d-kuan-100 d-hanggao-30 pull-right" href="javascript:dr_edit_son_type({$i});">
								<i class="fa fa-edit"></i> 修改
							</a>
							<a class="d-kuan-100 d-hanggao-30 pull-right" href="javascript:dr_del_son_type({$i});">
								<i class="fa fa-trash"></i> 删除
							</a>
						</div>
						<div class="d-clear"></div>
						{/if}
						
					{/loop}
					{loop $stype $i $t}
					   {if $t['moren'] ==0}
						<div class="d-kuan d-buhuanhang">
							<div class="d-hanggao-30 d-kuan d-beijing-hei-d9 d-xia-10 d-yuanjiao-10 pull-left">
								<span class="d-zuo-10">{$i} - {$t['name']}</span>
							</div>
							
							<a class="d-zuo-10 d-kuan-100 d-hanggao-30 pull-right" href="javascript:dr_edit_son_type({$i});">
								<i class="fa fa-edit"></i> 修改
							</a>
							<a class="d-kuan-100 d-hanggao-30 pull-right" href="javascript:dr_del_son_type({$i});">
								<i class="fa fa-trash"></i> 删除
							</a>
						</div>
						<div class="d-clear"></div>
						{/if}
						
					{/loop}
				</div>
				<div class="d-neikuang-20 ">
					<a class="btn btn-circle  btn-default" href="javascript:dr_add_son_type();">
						<i class="fa fa-plus"></i> 创建分类
					</a>
				</div>
			</div>
		</div>
	</div>
</div>
</form>

{template "fanhui.html"}

{template "footer.html"}